using System;
using Quartz;
using Webshop20.AntiCorruptionLayers.Quartz.Jobs;

namespace Webshop20.AntiCorruptionLayers.Quartz.Translators
{
    public class JobDetailTranslator : IJobDetailTranslator
    {
        public JobDetail ConvertToJobDetail(int processId, Type type)
        {
            JobDetail jobDetail = new JobDetail(processId.ToString(), null, typeof(ResurrectOrderProcessJob));
            jobDetail.JobDataMap["ProcessID"] = processId;
            jobDetail.JobDataMap["FollowingEventType"] = type;

            return jobDetail;
        }
    }
}